
<script setup>
import { ref, provide } from "vue"
import Father from './components/Father.vue'
const money = ref(100)
const changeMoney = (num) => {
  money.value = money.value - num
}
// provide 第一个参数 传的名字, 第二个参数 传的数据
provide('money', money)
provide('changeMoney', changeMoney)
</script>

<template>
  <div>
    app : {{ money}}
    <Father></Father>
  </div>
</template>

